import java.util.Scanner;

public class SumGroup1 {
    public static void main(String[] args) {
        Scanner stdIn=new Scanner(System.in);
        System.out.println("对整数进行加法运算");
        int total=0;
        Outer:
        for(int i=1;i<=10;i++)
        {
            System.out.println("第"+i+"组");
            int sum=0;
            Inner:
            for (int j=0;j<5;j++)
            {
                System.out.print("整数:");
                int t=stdIn.nextInt();
                if (t==99999)
                    break Inner;
                else if (t==88888)
                    break Outer;
                sum+=t;
            }
            System.out.println("小记值:"+sum);
            total+=sum;
        }
        System.out.println("合计值:"+total);
    }
}
